package com.spring.demo2.entity;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.stereotype.Component;


@Configurable(preConstruction = true)
public class UserPO {
    @Autowired
    private Person person;
    @Autowired
    private Comp comp;

    public String get(){
        person.setAddress("北京");
        person.setSchool("北京大学");
        comp.setArea("北京地区");
        comp.setMsg("北京是个好的地方");
        return comp.toString() + "  "+ person.toString();
    }
}
